home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-08-14 | 7.4 KB | 169 lines | [TEXT/MPS ] |
-
- ;-------------------------------------------------------------------
- ;
- ; General structure of a minimal configuration ROM:
- ;
- ; [Format/Header]
- ; |
- ; |
- ; [sResource Directory]
- ; /
- ; /
- ; /
- ; /
- ; [Board sResource]
- ;
- ;
- ;
- ; This minimal ROM has a Format header block, and an sResource Directory
- ; that points to a board sResource. Note that the OSLstEntry, and DatLstEntry
- ; Macros basically strip off the high byte and calculate the offset or data
- ; values. If the file fails to assemble, and the error points to a macro
- ; argument, usually a label can't be found.
- ;
- ;-------------------------------------------------------------------
-
- MACHINE MC68020
-
- ;=====================================================================
- ; Initial Assembler Directives
- ;=====================================================================
- STRING C
-
- PRINT OFF
- INCLUDE 'SysErr.a' ;Macintosh System equates
- INCLUDE 'SysEqu.a' ;Macintosh System equates
- INCLUDE 'ROMEqu.a' ;Declaration ROM equates
- INCLUDE 'SlotEqu.a' ;Slot Manager equates and macros
- INCLUDE 'TimeEqu.a' ;Macintosh traps
- INCLUDE 'Traps.a' ;Macintosh traps
- PRINT ON
-
- ;
- ;=====================================================================
- ; BEGIN Declaration ROM
- ;=====================================================================
- MinimalDeclROM MAIN
-
-
- ;*************************************************************
- ;Constants
- ;*************************************************************
-
- ROMSize EQU $1000 ;4K byte ROM
- TheBoardId EQU $9999 ;the Board Id (DON'T USE-get this from DTS)
-
- ;----------- sResource Directory ;<Id OF>
- sRsrc_Board EQU 1 ;Board sResource {May be any number in [0..127]}
-
-
-
- ;=====================================================================
- ; Directory
- ;=====================================================================
- _sRsrcDir OSLstEntry sRsrc_Board,_sRsrc_Board ;References the board sResource.
- DatLstEntry endOfList,0 ;End of the list.
-
-
- ;=============================================================
- ; sRsrc_Board List - the Board sResource
- ;=============================================================
- _sRsrc_Board OSLstEntry sRsrcType,_BoardType ;References the sResource type
- OSLstEntry sRsrcName,_BoardName ;References the sResource name.
- DatLstEntry boardId,TheBoardId ;The board Id.
- OSLstEntry vendorInfo,_VendorInfo ;References the OPTIONAL Vendor information list.
- DatLstEntry endOfList,0 ;End of the list.
-
- ;The Board sResource :
- _BoardType DC.W CatBoard ;<Category> CatBoard ALWAYS = $0001 for bd srsrc
- DC.W TypBoard ;<Type> TypBoard ALWAYS = $0000 for bd srsrc
- DC.W 0 ;<DrvrSw> CatBoard ALWAYS = $0000 for bd srsrc
- DC.W 0 ;<DrvrHw> CatBoard ALWAYS = $0000 for bd srsrc
- _BoardName DC.L 'Macintosh II video card' ;The name of the Board - should be
- ;the official product name
-
-
- ;-------------------------------------------------------------
- ; Vendor Info record
- ; Notes:
- ; Vendor info is OPTIONAL - not required in the board sResource
- ; Vendor info is Vendor specific - MacDTS DOES NOT ASSIGN these values
- ;-------------------------------------------------------------
- _VendorInfo OSLstEntry VendorId,_VendorId ;References the Vendor Id.
- OSLstEntry RevLevel,_RevLevel ;References the Revision Level.
- OSLstEntry PartNum,_PartNum ;References the Part Number.
- DatLstEntry endOfList,0 ;End of the list.
-
- _VendorId DC.L 'YourCompany, Inc.' ;The Vendor Id (whatever is desired)
- _RevLevel DC.L '1.0' ;The Revision Level (whatever is desired)
- _PartNum DC.L 'ABC-1' ;The Part Number (whatever is desired)
-
- ;-------------------------------------------------------------
- ; other (functional) sResources
- ; Normally, in addition to the required board sResource, you would have a
- ; "functional sResource" type. The functional sResource is recommended in
- ; addition to the board sResource, and exists to tell the world what type of
- ; function(s) your board can perform. There is usually one of these
- ; functional sResources for each function the board can perform. Applications
- ; or drivers typically look for their card by making a slot manager call
- ; to find the particular functional sResource (if found, the slot manager
- ; will return the slot id the functional sResource was found in). This, is,
- ; for example how QuickDraw finds video boards - allowing multiple vendors
- ; and video boards made after QuickDraw was written. In this way, applications
- ; can find new boards without having to hard code to boards (and thus require
- ; rebuilding in order to use new boards). Functional sResources have software
- ; driver ids associated with them, so applications can make driver calls to the
- ; boards. The advantage is that the underlying hardware (register addresses,
- ; and other hardware specific items) don't matter to the higher level application
- ; software, and the board can be revised or new boards added without having to
- ; change the application. Again, QuickDraw and the video driver are good
- ; examples - once a driver interface has been defined, applications don't need
- ; to worry about the actual hardware.
- ;
- ; MacDTS assigns functional sResources. Write in to DTS with the following
- ; information:
- ; - What the board will do (so we can assign the functional sResource values)
- ; - the official product name for the board (or a code name)
- ; - whether or not the board will have a software driver other than one
- ; which has been pre-defined (like Apple's video driver).
- ; - whether or not the board will have driver that will be on board
- ; (that is, in the ROM), or whether or not it will be a driver that
- ; gets installed at init time, in the application, etc.
- ; - company address (mailing and electronic addresses if possible) and
- ; the name of the person in the company responsible for the board (with
- ; a phone number if possible).
- ;
- ; MacDTS will then assign the values for the functional sResource(s); that is DTS
- ; will assign the Category, cType, DrvrSw and DrvrHw ids for all functional
- ; sResources. (Note that the board sResource is a degenerate case of functional
- ; sResources - it tells the slot manager that the board can perform the function
- ; of begin a board. If the slot manager can't find this sResource, it marks the
- ; slot as empty. The board sResource has the Category, cType, DrvrSw and DrvrHw
- ; ids already defined - see the comment in the board sResource section above.)
- ;
- ; MacDTS maintains a database of board ids and functional sResource ids to prevent
- ; id conflicts. The database is highly confidential to MacDTS eyes-only since it
- ; has unannounced products on it.
- ;-------------------------------------------------------------
-
-
- ORG ROMSize-FHeaderRec.fhBlockSize
- ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- ; Format/Header Block
- ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- DC.L (_sRsrcDir-*)**$00FFFFFF ;Offset to sResource directory
- DC.L ROMSize ;Length of declaration data
- DC.L 0 ;CRC {Patched by crcPatch (MPW tool)}
- DC.B romRevision ;Revision level
- DC.B AppleFormat ;Format
- DC.L TestPattern ;Test pattern
- DC.B 0 ;Reserved byte (must be zero)
- DC.B $E1 ;ByteLanes: 1110 0001 (bytelane 0)
-
-
- ENDP
-
-
- END
-
-